<template>
    <div>
        <button @click="getOut">退出登录</button>
        <h1 align="center">这里是首页</h1>
    </div>
</template>

<script>
export default {
    data() {
        return {

        };
    },
    mounted() {
        
    },
    methods: {
        getOut(){
            localStorage.clear();
            this.$router.push('/login');
        }
    },
};
</script>

<style scoped >

</style>
